package cn.kgc.spring04.proxy;

import cn.kgc.spring04.interfce.Teacher;
import cn.kgc.spring04.interfce.impl.TeacherA;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/2/20
 * @Description:  teacher的静态代理类
 */
public class TeacherAStaticProxy implements Teacher {


    private TeacherA teacherA = new TeacherA();

    @Override
    public String teachOnLine(String course) {

        System.out.println(course+"课程上课时间到了");

        String s = teacherA.teachOnLine(course);

        System.out.println(course+"课程下课时间到了");
        return s;
    }

    @Override
    public String teachOffLine(String course) {


        System.out.println(course+"课程上课时间到了");

        String s = teacherA.teachOffLine(course);

        System.out.println(course+"课程下课时间到了");

        return s;
    }
}
